t = int(input())
for _ in range(t):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n - 1):
ans = max(ans, a[i] * a[i + 1])
print(ans)
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int a[100000];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int max=0;
for(int i=0;i<n-1;i++)
{
if(a[i]*a[i+1]>max)
{
max=a[i]*a[i+1];
}
}
cout<<max<<endl;
}
return 0;
}
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |
e-maze-in | Bricks Game |
Char Sum | Two Strings |